package com.atguigu.gulimall.search.vo;

import com.atguigu.common.to.es.EsSkuVo;
import lombok.Data;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

/**
 * Copyright (c) 2019-2029 星大陆 All Rights Reserved
 * <p>
 * Project: gulimall
 * Package: com.atguigu.gulimall.search.vo
 * Version: V 1.0
 * <p>
 * Created by guoxiaolong on 2020/08/07 7:55
 */
@Data
public class SearchResponse implements Serializable {

    //查询到的所有商品信息
    private List<EsSkuVo> products;


    /**
     * 以下是分页信息
     */
    //总记录数
    private Long total;

    //每页显示的内容
    private Integer pageSize;

    //当前页面
    private Integer pageNum;

    //当前查询到的结果，所有涉及到的所有品牌
    private List<BrandVo> brands;

    //当前查询到的结果，所有涉及到的所有分类
    private List<CatalogVo> catalogs;

    //当前查询到的结果，所有涉及到的所有属性
    private List<AttrVo> attrs;

    //================== 以上是返回给页面的所有信息 ==================
    @Data
    public static class BrandVo {
        private Integer brandId;
        private String brandName;
        private String brandImg;
    }

    @Data
    public static class CatalogVo {
        private Integer catalogId;
        private String catalogName;
    }

    @Data
    public static class attrVo {
        private Long attrId;
        private String attrName;
        private List<String> attrValue;
    }


}
